// xrtdasm.cpp : Defines the entry point for the console application.
//

#include "xort.h"


int main( int argc, char* argv[])
{
    SYMBOL_LIST  listGlobal;
    STRING_ARRAY litPool;
    string csFName = argv[1];

    if( XORT_OK == LoadExecutable( csFName, listGlobal, litPool ) )
    {
        csFName.Replace( ".", "_" );
        csFName += ".asm";

        io_logOpen( csFName );
        xInitPrims();

        stringref pcsSrcFile = litPool.get( 2 );
        lex_Input( *pcsSrcFile );
        DumpSymbolTable( listGlobal );
        lit_DumpLitPool( litPool );
        xFreePrims();
        io_logClose();
    }

	return 0;
}

